<script lang="ts" setup>
const route = useRoute()
if (route.query.lang) {
  const lang = route.query.lang as string
  const layout = useLayoutStore()
  if (['en', 'ar', 'fa', 'de', 'tr', 'cn'].includes(lang))
    layout.changeLanguage(lang)
}

if (route.query.theme) {
  const theme = route.query.theme as string
  const layout = useLayoutStore()
  layout.setDarkTheme(theme === 'dark')
}
// 修改默认跳转路径为性能监控页面
useRouter().replace('/Dashboard/analytics')
</script>